package cn.edu.zzuli.nothinglink.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
public class StuRegisterVo {

    @NotNull(message = "姓名不能为空")
    @NotEmpty(message = "姓名不能传入空字符串")
    private String name;

    @NotNull(message = "用户名不能为空")
    @NotEmpty(message = "用户名不能为空字符串")
    private String username;

    @NotNull(message = "密码不能为空")
    @NotEmpty(message = "密码不能传入空字符串")
    private String password;

    private Integer classId;

    @NotNull(message = "性别不能为空")
    private String gender;

    private String avatar;

    @Length(max = 11, min = 11, message = "传入的手机号码必须是11位")
    @NotNull(message = "手机号不能为空")
    private String phone;

    @Email
    @NotNull(message = "邮箱不能为空")
    private String email;

    @NotNull(message = "学号不能为空")
    private String stuNumber;
}
